/**********************************
 * Library to make use of Lists 
 *
 * @author Jorge Machado
 * @date 12-12-2008
 *
 */
#ifndef _LISTAS_H
#define _LISTAS_H

#include <stdio.h>
#include <stdlib.h>

typedef struct ListNode_Struct
{
	void* element;
	struct ListNode_Struct *next;
	struct ListNode_Struct *previous;
}ListNode;

typedef struct List_Struct
{
	int size;
	ListNode *firstElement;
	ListNode *lastElement;
}List;

List * createNewList();
void * lstRemoveElement(List * l, int i);
void lstAddElement(List * l, void * element);
void lstAddElementInBegin(List * l, void * element);
void * lstGetElement(List * l, int i);
void * firstElement(List * list);
void * secondElement(List * list);
void * thirdElement(List * list);
void * lastElement(List * list);
int lstSize(List * l);
List * copyList(List * l);



#else
/* code to include if the token is defined */
#endif

